package com.kkb.kkbportal.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Description 新建和update评分的post参数
 * @Author qtds
 * @Date 2021/8/13 , 0:09
 */
@Data
@ApiModel(value = "ScoreDto对象", description = "评价信息dto")
@NotNull
public class ScoreDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评价主键id")
    private Long id;

    @NotNull(message = "评价人不能为空")
    @ApiModelProperty(value = "评价人id（用户表主键）", required = true)
    private Long masterId;

    @NotNull(message = "被评价人不能为空")
    @ApiModelProperty(value = "被评价人id（用户表主键）", required = true)
    private Long slaveId;

    @NotNull(message = "项目id不能为空")
    @ApiModelProperty(value = "评价项目id（项目表主键）", required = true)
    private Long objectId;

    @NotEmpty(message = "评价内容不能为空")
    @ApiModelProperty(value = "评价内容", required = true)
    private String msg;

    @NotNull(message = "评价星级1不能为空")
    @Range(min = 1, max = 5, message = "评价星级必须在1~5之间")
    @ApiModelProperty(value = "评价星级1（1~5）", required = true)
    private Integer starOne;

    @NotNull(message = "评价星级2不能为空")
    @Range(min = 1, max = 5, message = "评价星级必须在1~5之间")
    @ApiModelProperty(value = "评价星级2（1~5）", required = true)
    private Integer starTwo;

    @NotNull(message = "评价星级3不能为空")
    @Range(min = 1, max = 5, message = "评价星级必须在1~5之间")
    @ApiModelProperty(value = "评价星级3（1~5）", required = true)
    private Integer starThree;

    @ApiModelProperty(value = "评价类型：false：匿名评价 true：实名评价,默认实名", dataType = "boolean")
    private Boolean scoreIsReal;

}
